Number System Converter

Binary to Decimal
Decimal to Binary
Binary to Hex
Decimal to Hex
Enter a binary number (only 0s and 1s)
Result:
Conversion Steps:
Enter a positive integer
Result:
Conversion Steps:
Enter a binary number (only 0s and 1s)
Result:
Conversion Steps:
Enter a positive integer
Result:
Conversion Steps:

About Number Systems

Binary Number System (Base 2)

The binary number system uses only two digits: 0 and 1. Each digit's position represents a power of 2, starting from the rightmost digit (2^0 = 1).

For example, the binary number 101 represents:

  • 1 × 2^2 = 1 × 4 = 4
  • 0 × 2^1 = 0 × 2 = 0
  • 1 × 2^0 = 1 × 1 = 1

So 101 in binary equals 5 in decimal.

Decimal Number System (Base 10)

The decimal system is our standard number system, using ten digits (0-9). Each position represents a power of 10.

For example, the decimal number 123 represents:

  • 1 × 10^2 = 1 × 100 = 100
  • 2 × 10^1 = 2 × 10 = 20
  • 3 × 10^0 = 3 × 1 = 3

Adding these values: 100 + 20 + 3 = 123

Hexadecimal Number System (Base 16)

The hexadecimal system uses 16 digits: 0-9 and A-F (where A=10, B=11, ..., F=15). Each position represents a power of 16.

For example, the hexadecimal number 1A represents:

  • 1 × 16^1 = 1 × 16 = 16
  • A (10) × 16^0 = 10 × 1 = 10

So 1A in hexadecimal equals 26 in decimal.

Octal Number System (Base 8)

The octal system uses 8 digits (0-7). Each position represents a power of 8.

For example, the octal number 17 represents:

  • 1 × 8^1 = 1 × 8 = 8
  • 7 × 8^0 = 7 × 1 = 7

So 17 in octal equals 15 in decimal.

Frequently Asked Questions

Why are binary numbers important in computing?

Binary numbers are fundamental to computing because electronic circuits can easily represent two states: on (1) and off (0). Inside a computer, all data—whether text, images, videos, or programs—is ultimately stored and processed as binary digits (bits).

Binary is the native language of digital logic and forms the basis for all digital systems.

How do I convert a binary number to decimal manually?

To convert a binary number to decimal:

  1. Write down the binary number
  2. Starting from the rightmost digit, assign powers of 2 (2^0, 2^1, 2^2, etc.)
  3. Multiply each binary digit by its corresponding power of 2
  4. Sum all the results

For example, for binary 1101:

  • 1 × 2^3 = 8
  • 1 × 2^2 = 4
  • 0 × 2^1 = 0
  • 1 × 2^0 = 1

8 + 4 + 0 + 1 = 13 (decimal)

Why is hexadecimal commonly used instead of binary?

Hexadecimal is often used as a more human-friendly representation of binary data because:

  • It's more compact: each hex digit represents exactly 4 binary digits
  • It's easier to read and write: "1A3F" is more manageable than "0001101000111111"
  • It reduces the chance of errors when working with large binary numbers

Programmers commonly use hexadecimal for memory addresses, color codes, and debugging binary data.

What is the difference between signed and unsigned binary?

Unsigned binary represents only positive numbers or zero. All bits contribute to the magnitude of the number.

Signed binary can represent both positive and negative numbers. The most common representation is two's complement, where the leftmost bit indicates the sign (0 for positive, 1 for negative).

For example, in an 8-bit signed system:

  • 00000101 = +5
  • 11111011 = -5 (in two's complement)

This converter handles unsigned binary numbers by default.

What are some common mistakes when converting between number systems?

Common mistakes include:

  • Using incorrect digit values (e.g., using digits 8 or 9 in octal)
  • Reversing the order of digits when writing down the result
  • Miscalculating place values (powers of the base)
  • Forgetting to use letters A-F for values 10-15 in hexadecimal
  • Confusing the direction of conversion (e.g., applying decimal-to-binary steps for a binary-to-decimal conversion)

Using this calculator can help avoid these common errors.